package com.atguigu.gulimall.product.quartz;

import com.atguigu.gulimall.product.config.SpringContextJobConfig;
import com.atguigu.gulimall.product.service.AttrService;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @ClassName QuartzJob
 * @Description TODO
 * @Author 13290
 * @Date 2022/10/24 15:23
 **/
public class QuartzJob implements Job {

    @Autowired
    AttrService attrService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        AttrService attrService = (AttrService) SpringContextJobConfig.getBean("attrService");
        attrService.quartzTest();

    }
}
